package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.Role;
import com.zzyl.entity.RoleResource;
import com.zzyl.vo.RoleVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleResourceMapper {


    @Select("select resource_no from sys_role_resource where role_id =#{roleId}")
    List<String> getByRoleId(Long roleId);

    @Delete("delete from sys_role_resource where role_id = #{roelId}")
    void deleteByRoleId(Long roleId);

    void insertBatch(List<RoleResource> roleResourceList);

}
